<?php
class Agitum_Model_Tour extends Agitum_Model_Object
{
	protected $_t_class = 'Agitum_Model_DbTable_Tour';
	
	public static function search($term, $level)
	{
		$db = Zend_Registry::get('Zend_Db');
		
		$select = $db->select();
		$select->from(array('a'=>'tour'), array( 'id', 'title') )
			->where( new Zend_Db_Expr('a.title like '. $db->quote($term.'%')) )
			;
		return $select->query()->fetchAll();
	}
}